package com.itcast.pojo;


public class PageBean {

    private int pageSize=5; //每页条数  --5条
    private int totalCount; //记录总数
    private int currPageNo=1; //当前页码
    private int totalPageCount=1; //总页数
    private int start;   //开始的条数


    public int getPageSize() {
        return pageSize;
    }
    public void setPageSize(int pageSize) {
        if(pageSize>0){
            this.pageSize = pageSize;
        }
    }
    public int getTotalCount() {
        return totalCount;
    }
    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
        //得到总页数
        if(totalCount!=0){
            this.totalPageCount=totalCount%pageSize==0?totalCount/pageSize:totalCount/pageSize+1;
        }
    }
    public int getCurrPageNo() {
        return currPageNo;
    }
    public void setCurrPageNo(int currPageNo) {
        this.currPageNo = currPageNo;
    }
    public int getTotalPageCount() {
        return totalPageCount;
    }
    public void setTotalPageCount(int totalPageCount) {
        this.totalPageCount = totalPageCount;
    }
    //开始条数 （第二页  5）
    public int getStart() {
        return (currPageNo-1)*pageSize;
    }
    public void setStart(int start) {
        this.start = start;
    }




}
